package com.matt.foundation.model;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 * *******************************
 * Created by Ron.
 * form com.matt
 * on 2017/5/22
 * *******************************
 */
@MappedSuperclass
@Data
@JsonIgnoreProperties({ "handler","hibernateLazyInitializer" })
public abstract class Model implements Serializable{

    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    @Column(length = 32)
    private String id;

}
